package Thread;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-10-16
 * Time: 12:17
 */
public class Demo1 {

    public static void main(String[] args) throws InterruptedException {
        Object lock = new Object();
        System.out.println("wait 之前");

            synchronized (lock) {
                //加锁的
                lock.wait(10000);//等待过程中加解锁的
                //加锁的
            }

        System.out.println("wait 之后");
    }
}
